package org.brisling.medical.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import org.brisling.base.domain.impl.BaseMonitorDomain;
import org.brisling.base.domain.inf.BaseDomainInf;
import org.brisling.common.ConstSysParam;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 门诊基本处方统计信息表
 * <p>Title: BaseOutpatient</p>
 * <p>Description: </p>
 * <p>Company: tongking </p>
 * @author jackson wang
 * @since  1.0
 * @version 1.0
 * @date 2016年5月25日 下午5:23:20
 */

@Entity
@Table(name=ConstSysParam.MODULE_BASE_OUTPATIENT)
public class BaseOutpatient extends BaseMonitorDomain implements BaseDomainInf{

	@Id
	@Column
	@GeneratedValue(strategy=GenerationType.TABLE,generator="baseOutpatientGenerator")
	@TableGenerator(name="baseOutpatientGenerator",
					table="sysman_generation_key",
					pkColumnValue=ConstSysParam.MODULE_BASE_OUTPATIENT,
					pkColumnName="primary_key",
					valueColumnName="key_value",
					allocationSize=1)
	private Long id;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	
	private String prescribe_code;
	
	private String doct_depart_code;
	
	private String doct_depart_name;
	
	private String patient_no;
	
	private String patient_name;
	
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private Date start_time;
	
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private Date end_time;
	
	private Long is_drug;
	
	private Double anti_drug_amount;

	private Long is_base;
	
	private Long is_anti;
	
	private Double base_drug_amount;
	
	private Long drug_num;
	
	private Double all_price;
	
	//西药总金额
	private Double all_western_price;
	
	//中药总金额
	private Double all_TWC_price;
	
	//中成药总金额
	private Double all_chen_price;
	
	private Double base_price;
	
	private Long day_num;
	//西药总金额
	private Double all_western_price_chan;
	
	//中药总金额
	private Double all_TWC_price_chan;
	
	//中成药总金额
	private Double all_chen_price_chan;
	
	private Long day_num_chan;
	
	private String accounting_deptname;

	private Long gold_medical;

	private String outpatient_number;

	private String mzhm;
	
	//药房识别(门急诊药房区分)
	private Integer yfsb;
	
	//药品种类超标
	private Integer maybe_type_over;
	
	private Integer real_type_over;
	
	
	//药品周期超标
	private Integer maybe_date_over;
	
	private Integer real_date_over;
	
	//处方价格超标
	private Integer maybe_price_over;
	
	private Integer real_price_over;
	
	
	//超标标志
	private Integer maybe_over_status = 0;
	
	private Integer real_over_status;
	
	public String getPrescribe_code() {
		return prescribe_code;
	}

	public void setPrescribe_code(String prescribe_code) {
		this.prescribe_code = prescribe_code;
	}

	public String getDoct_depart_code() {
		return doct_depart_code;
	}

	public void setDoct_depart_code(String doct_depart_code) {
		this.doct_depart_code = doct_depart_code;
	}

	public String getDoct_depart_name() {
		return doct_depart_name;
	}

	public void setDoct_depart_name(String doct_depart_name) {
		this.doct_depart_name = doct_depart_name;
	}

	public String getPatient_no() {
		return patient_no;
	}

	public void setPatient_no(String patient_no) {
		this.patient_no = patient_no;
	}

	public String getPatient_name() {
		return patient_name;
	}

	public void setPatient_name(String patient_name) {
		this.patient_name = patient_name;
	}

	public Date getStart_time() {
		return start_time;
	}

	public void setStart_time(Date start_time) {
		this.start_time = start_time;
	}

	public Date getEnd_time() {
		return end_time;
	}

	public void setEnd_time(Date end_time) {
		this.end_time = end_time;
	}

	public Long getIs_drug() {
		return is_drug;
	}

	public void setIs_drug(Long is_drug) {
		this.is_drug = is_drug;
	}

	public Double getAnti_drug_amount() {
		return anti_drug_amount;
	}

	public void setAnti_drug_amount(Double anti_drug_amount) {
		this.anti_drug_amount = anti_drug_amount;
	}

	public Long getIs_base() {
		return is_base;
	}

	public void setIs_base(Long is_base) {
		this.is_base = is_base;
	}

	public Long getIs_anti() {
		return is_anti;
	}

	public void setIs_anti(Long is_anti) {
		this.is_anti = is_anti;
	}

	public Double getBase_drug_amount() {
		return base_drug_amount;
	}

	public void setBase_drug_amount(Double base_drug_amount) {
		this.base_drug_amount = base_drug_amount;
	}

	public Long getDrug_num() {
		return drug_num;
	}

	public void setDrug_num(Long drug_num) {
		this.drug_num = drug_num;
	}

	public Double getAll_price() {
		return all_price;
	}

	public void setAll_price(Double all_price) {
		this.all_price = all_price;
	}

	public Double getAll_western_price() {
		return all_western_price;
	}

	public void setAll_western_price(Double all_western_price) {
		this.all_western_price = all_western_price;
	}

	public Double getAll_TWC_price() {
		return all_TWC_price;
	}

	public void setAll_TWC_price(Double all_TWC_price) {
		this.all_TWC_price = all_TWC_price;
	}

	public Double getAll_chen_price() {
		return all_chen_price;
	}

	public void setAll_chen_price(Double all_chen_price) {
		this.all_chen_price = all_chen_price;
	}

	public Double getBase_price() {
		return base_price;
	}

	public void setBase_price(Double base_price) {
		this.base_price = base_price;
	}

	public Long getDay_num() {
		return day_num;
	}

	public void setDay_num(Long day_num) {
		this.day_num = day_num;
	}

	public String getAccounting_deptname() {
		return accounting_deptname;
	}

	public void setAccounting_deptname(String accounting_deptname) {
		this.accounting_deptname = accounting_deptname;
	}

	public Long getGold_medical() {
		return gold_medical;
	}

	public void setGold_medical(Long gold_medical) {
		this.gold_medical = gold_medical;
	}

	public String getOutpatient_number() {
		return outpatient_number;
	}

	public void setOutpatient_number(String outpatient_number) {
		this.outpatient_number = outpatient_number;
	}

	public String getMzhm() {
		return mzhm;
	}

	public void setMzhm(String mzhm) {
		this.mzhm = mzhm;
	}

	public Double getAll_western_price_chan() {
		return all_western_price_chan;
	}

	public void setAll_western_price_chan(Double all_western_price_chan) {
		this.all_western_price_chan = all_western_price_chan;
	}

	public Double getAll_TWC_price_chan() {
		return all_TWC_price_chan;
	}

	public void setAll_TWC_price_chan(Double all_TWC_price_chan) {
		this.all_TWC_price_chan = all_TWC_price_chan;
	}

	public Double getAll_chen_price_chan() {
		return all_chen_price_chan;
	}

	public void setAll_chen_price_chan(Double all_chen_price_chan) {
		this.all_chen_price_chan = all_chen_price_chan;
	}

	public Long getDay_num_chan() {
		return day_num_chan;
	}

	public void setDay_num_chan(Long day_num_chan) {
		this.day_num_chan = day_num_chan;
	}

	public Integer getYfsb() {
		return yfsb;
	}

	public void setYfsb(Integer yfsb) {
		this.yfsb = yfsb;
	}

	/**
	 * @return the maybe_type_over
	 */
	public Integer getMaybe_type_over() {
		return maybe_type_over;
	}

	/**
	 * @param maybe_type_over the maybe_type_over to set
	 */
	public void setMaybe_type_over(Integer maybe_type_over) {
		this.maybe_type_over = maybe_type_over;
		if(( null!=maybe_type_over ) && maybe_type_over>0){
			this.maybe_over_status += 1;
		}
	}

	/**
	 * @return the real_type_over
	 */
	public Integer getReal_type_over() {
		return real_type_over;
	}

	/**
	 * @param real_type_over the real_type_over to set
	 */
	public void setReal_type_over(Integer real_type_over) {
		this.real_type_over = real_type_over;
	}

	/**
	 * @return the maybe_date_over
	 */
	public Integer getMaybe_date_over() {
		return maybe_date_over;
	}

	/**
	 * @param maybe_date_over the maybe_date_over to set
	 */
	public void setMaybe_date_over(Integer maybe_date_over) {
		this.maybe_date_over = maybe_date_over;
		
		if(( null!=maybe_date_over ) && maybe_date_over>0){
			this.maybe_over_status += 1;
		}
	}

	/**
	 * @return the real_date_over
	 */
	public Integer getReal_date_over() {
		return real_date_over;
	}

	/**
	 * @param real_date_over the real_date_over to set
	 */
	public void setReal_date_over(Integer real_date_over) {
		this.real_date_over = real_date_over;
	}

	/**
	 * @return the maybe_price_over
	 */
	public Integer getMaybe_price_over() {
		return maybe_price_over;
	}

	/**
	 * @param maybe_price_over the maybe_price_over to set
	 */
	public void setMaybe_price_over(Integer maybe_price_over) {
		this.maybe_price_over = maybe_price_over;
		if(( null!=maybe_price_over ) && maybe_price_over>0){
			this.maybe_over_status += 1;
		}
	}

	/**
	 * @return the real_price_over
	 */
	public Integer getReal_price_over() {
		return real_price_over;
	}

	/**
	 * @param real_price_over the real_price_over to set
	 */
	public void setReal_price_over(Integer real_price_over) {
		this.real_price_over = real_price_over;
	}

	/**
	 * @return the maybe_over_status
	 */
	public Integer getMaybe_over_status() {
		return maybe_over_status;
	}

	/**
	 * @param maybe_over_status the maybe_over_status to set
	 */
	public void setMaybe_over_status(Integer maybe_over_status) {
		this.maybe_over_status = maybe_over_status;
	}

	/**
	 * @return the real_over_status
	 */
	public Integer getReal_over_status() {
		return real_over_status;
	}

	/**
	 * @param real_over_status the real_over_status to set
	 */
	public void setReal_over_status(Integer real_over_status) {
		this.real_over_status = real_over_status;
	}
	
	
}
